<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="app" uri="/application" %>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<link href="../css/dtree.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../scripts/dtreeAuth.js"></script>
<style type="text/css">
   .art_ul {overflow: hidden;}
   .art_ul li{padding:2px;margin:2px;display:block;overflow: hidden;border:1px solid #666;float:left;width:130px;border:1px solid #666}
   .art_ul li img{width:120px;height:88px;}
   .art_ul div{padding:2px;}
   .content_main table td {text-align: left;}
</style>

</head>
<body>
<div id="all_main">
  <div class="head_main">
    <div class="main_nav">展览活动-&gt;添加展览作品</div>
    <div class="main_soso">
    	
    </div>
    <div class="main_title">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <th width="100%" style="border-left:none;text-align: left;font-weight: normal;">展览作品查询 </th>
        </tr>
      </table>
    </div>
  </div>
  <div class="content_main">
    <form action="" name="form01" method="post">
    <input name="id" value="${show.id}"  type="hidden" id="showId"/>
    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="background_hegh01">
      <tr>
        <td  style="border-left:none;text-align: left;" >艺术家：<input name="art.realName" value="" /> 作品名称：<input name="product.productName" value="" />
        作品类型：<select name="product.productType">
              <option value="">请选择...</option>
              <app:cons_select code="002"></app:cons_select>
           </select>
        </td>
      </tr>
    </table>
    </form>
  </div>
  <div class="lapel" style="background:#FFFFFF;text-align: left;margin:5px;"><span>
  <input name="" type="button" class="input01" value="查询作品" onclick="WBPage.searchProduct();"    />
  <input name="" type="button" class="input01" value="展览活动信息" onclick="javascript:window.location='/show/to_show_campaign.shtml?id=${show.id}'"    />
 <!-- <input name="" type="button" class="input01" value="添加选中作品到展览 --${show.campaignName}"/> -->
  </span></div>
  
  
  <div class="main_title" style="background: #F4F4F4">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <th width="100%" style="border-left:none;text-align: left;font-weight: normal;">展览作品信息  </th>
        </tr>
      </table>
    </div>
  
  <div class="content_main">
    <ul class="art_ul" id="art_ul">
	  
	   

    </ul>
    <div id="foot_div"></div>
  </div>
 
  
   
  
</div>
<div id="boxId" style="position: absolute;background: red;display:none;"><span style="color:#fff;">请稍候...</span></div>
</body>
</html>
<script type="text/javascript" src="/system/config_js.shtml"></script>
<script type="text/javascript" src="/scripts/util.js"></script>
<script type="text/javascript" src="/scripts/form_validate.js"></script>
<script type="text/javascript" src="/scripts/calendar.js"></script>
<script type="text/javascript" src="/scripts/wb.js"></script>
<script type="text/javascript" src="/scripts/page.js"></script>
<script type="text/javascript" src="/scripts/xhr.js"></script>
<script type="text/javascript" src="/scripts/page_list.js"></script>

<script type="text/javascript">
    var showId='${show.id}';
    
    
    
	WBPage.searchProduct=function(id){
	   function cb(d){
		   var art_ul = util.$('art_ul');
		   var _html='';
		   util.each(d.list,function(e){
			   _html+='<li><div> <img title="'+e.productName+'"  src="'+Config["image.cache"]+e.icoPath+'"/></div><div style="">';
			   _html+=' <span title="'+e.productName+'">标题:'+util.substring(e.productName,6) +'<span><br/>';
			   //_html+=' 作者:'+e.productName+'<br/>';
			   _html+=' <input name="a" type="button" class="input01" value="添加到展览" onclick="WBPage.appendToShow('+e.id+')"   /></div></li>';
		   });
		   art_ul.innerHTML=_html;
	   }
	   var page = new Page('/show/search_show_product.shtml',cb,util.$('foot_div'));
	   page.setPageSize(50);
	   page.setForm(document.form01);
	   page.execute();
	}    
	WBPage.appendToShow=function(id){
	   if(confirm('确定把作品添加到展览?')){
		   function cb(d){
			  util.close_dusk("boxId");
			  WBPage.searchProduct();
		   }
		   new xhr('/show/append_to_Show.shtml',cb).setParameter('showId',showId).setParameter('id',id).execute();
		  util.dusk_div("boxId");
	   }
	}
	//WBPage.searchProduct();
	
	
	          
	                          
	          

</script>